package cn.zhf.shop.service;

import cn.zhf.shop.entity.ClassUser;
import cn.zhf.shop.entity.Message;
import cn.zhf.shop.entity.search.ClassUserSearch;
import org.apache.ibatis.annotations.Param;
import org.springframework.cglib.core.ClassInfo;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * 学生用户服务
 */
@Service
@Validated
public interface ClassUserService {

    /**
     * 注册
     */
    Message<?> register(@Valid ClassUser c);

    /**
     * 小程序授权登录
     */
    Message<?> loginByMiniProgram(@NotBlank(message = "jsCode不得为空") String jsCode);

    /**
     * 短信验证码登录
     */
    Message<?> loginByCaptcha(String userId);

    /**
     * 获取所有用户
     */
    Message<List<ClassUser>> getAll();

    /**
     * 根据编号获取用户信息
     */
    Message<ClassUser> getUserInfoByUserId(@NotBlank(message = "userId不得为空") String userId);

    /**
     * 根据编号获取用户信息
     */
    Message<List<ClassUser>> getUserByOrgId(int orgId);

    /**
     * 根据小程序OpenId获取用户信息
     */
    Message<ClassUser> getUserInfoByOpenId(@NotBlank(message = "openId不得为空") String openId);

    /**
     * 根据用户编号更新用户信息
     */
    Message<?> updateUserInfoByUserId(ClassUser c);


    Message<?> deleteByPrimaryKey(String id);

    int insert(ClassUser record);

    int insertSelective(ClassUser record);

    ClassUser selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(ClassUser record);

    int updateByPrimaryKey(ClassUser record);

    Message zhanghaoLogin(String id, String user_pwd);

    Message updateUserStatusById(Integer updatedUserStatus, String id);


    Message mohusearch(String str);


    Message<List<ClassUser>> selectByStuPhoneAndStuIdCardAndStuUserName(String stuPhone, String stuIdCard, String stuUserName);

    Message mohuConditionSearch(ClassUserSearch classUserSearch);
}





